<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
<h:head><title>Lista Pacchetti Predefiniti</title></h:head>
<h:body>
<h:form>  
    <p:dataTable id="dataTable" var="list" value="#{PackBean.listaPacchettiPredefiniti()}" widgetVar="PacchettoTable"   
            emptyMessage="Nessun Pacchetto Trovato" filteredValue="#{PackBean.pacchettiScelti}">  
           
        <p:column id="nomeColumn" filterBy="nome"   
                headerText="Nome"
                filterMatchMode="contains">  
            <h:outputText value="#{list.nome}" />  
        </p:column>  

        <p:column id="descrizioneColumn"  
                headerText="Descrizione"
                filterMatchMode="contains">  
            <h:outputText value="#{list.descrizione}" />  
        </p:column>
        
        <!-- 
        <p:column id="partenzaColumn"  
                headerText="Partenza"
                filterMatchMode="startsWith">  
            <h:outputText value="#{list.getGiornate().get(0).getTrasporto().getVolo().getLuogoPartenza()}" />  
        </p:column>
        -->
        
	  <p:column>
	    <a href="redirect.xhtml?idp=#{list.idPacchetto}" >Modifica</a>
	  </p:column>
	</p:dataTable>
</h:form>

</h:body>
</html>